export const triggerClick = () => {}

export const triggerConfigWebId = () => {
  window.Slardar('config', {
    slardar_web_id: 'reconfiged-web-id',
  })
}

export const triggerEmitCounter = () => {
  window.Slardar('emit', 'counter', {
    name: 'cypress-oncollect',
    value: 1000,
    tags: {
      from: 'cypress-oncollect',
    },
  })
}

export const triggerHashChange = () => {
  window.location.hash = 'hashChange'
}

export const triggerHistoryGo = () => {
  window.history.go(-1)
}

export const triggerHistoryForward = () => {
  window.history.forward()
}

export const tirggerHistoryBack = () => {
  window.history.back()
}

export const triggerPushState = () => {
  window.history.pushState({ foo: 'foo1' }, 'page 2', '/pushstate.html')
}

export const triggerReplaceState = () => {
  window.history.replaceState({ foo: 'foo1' }, 'page 2', '/replaceState.html')
}
